#! /bin/bash

# backup stdout fd positon
exec 3>&1
# redirect stdout to file
exec 1> test.out

cd ..
ls

# restore stdout to back-pos
exec 1>&3

